<?php
class User extends AppModel {
	var $name = 'User';
	
	var $primaryKey  = 'id';
	
	var $useTable = "users";
	
	function login($username, $password){
		return $this->find(
			'first',
			array(
				'conditions' => array (
					"{$this->alias}.username"	=> $username,
					"{$this->alias}.password"	=> $password
				)
			)
		);
	}
	
}

?>